FROM gitlab/gitlab-runner:alpine-v14.5.0
ENV TZ="Asia/Shanghai"
MAINTAINER LCR
WORKDIR /www

COPY repositories /etc/apk/repositories
COPY rsync.password /etc
COPY rsync.sh /www

RUN apk update \
    && apk upgrade \
    && apk add vim \
    && apk add sudo \
    && apk add rsync

RUN  chown gitlab-runner /etc/rsync.password \
     && chmod 600 /etc/rsync.password \
     && chmod -R 777 /www \
     && echo "gitlab-runner ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

